import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/login/jwt',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/merchant/info',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/login/exit',
    method: 'post'
  })
}

export function register(data) {
  return request({
    url: '/merchant/register',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/merchant/update',
    method: 'put',
    data
  })
}

export function forgotPassword(data) {
  return request({
    url: '/merchant/forgot-password',
    method: 'put',
    data
  })
}

export function oldPasswordUpdate(data) {
  return request({
    url: '/merchant/old-password-update',
    method: 'put',
    data
  })
}

export function codePasswordUpdate(data) {
  return request({
    url: '/merchant/code-password-update',
    method: 'put',
    data
  })
}

export function bindingContact(data) {
  return request({
    url: '/merchant/binding-contact',
    method: 'put',
    data
  })
}
